Skip to content

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented Jan 31, 2025

closes #11964

Default preamble is empty list and we need to make sure to not create a Div when empty preamble is found.

In typst or HTML this would create an empty block - for LaTeX we do have a finalizer to descaffold a Div with no attributes at all.

@cscheid
Copy link
Collaborator

cscheid commented Jan 31, 2025

This is a good immediate fix, thank you!

We might consider adding the descaffolding filter to typst. But we need to be careful: in typst these divs are important. Specifically, they introduce a new lexical scope environment, so that changing values inside the scope doesn't propagate outside it.

@cderv
Copy link
Collaborator Author

cderv commented Jan 31, 2025

Thanks !

We might consider adding the descaffolding filter to typst. But we need to be careful

Yeah I was planning to leave this on the side. We shouldn't be needing this in theory if we don't create those empty divs. In LaTeX, I think we added this specific handling in finalizer because it could break the document making it not renderable.

[skip ci]
@cderv cderv merged commit ca05876 into main Jan 31, 2025
@cderv cderv deleted the layout-panel/empty-preamble branch January 31, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extra #block[ ] when translating column-block to typst

3 participants